package xhwl.insurance.http.api;

import com.google.gson.Gson;

import okhttp3.RequestBody;
import rx.Observable;
import xhwl.insurance.http.ApiService;
import xhwl.retrofitrx.BaseApi;

/**
 * Created by fuyi on 2017/10/12.
 */

public class VideoDetailsApi extends BaseApi {

    VideoDetailsReq req;
    public VideoDetailsApi(String member_id,String video_id) {
        req = new VideoDetailsReq(member_id,video_id);
    }

    @Override
    protected Observable getObservable() {
        RequestBody requestBody = RequestBody.create(okhttp3.MediaType.parse("application/json; charset=utf-8"), new Gson().toJson(req));
        return retrofit.create(ApiService.class).getVideoDetails(requestBody);
    }

    class VideoDetailsReq {
        public String member_id;
        public String video_id;

        public VideoDetailsReq(String member_id,String video_id){
            this.member_id = member_id;
            this.video_id = video_id;
        }
    }
}
